import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:moose_app/ui/values/values.dart';
import 'package:moose_app/ui/widgets/user/user_avatar.dart';

class ATHVideoBottomInfo extends StatelessWidget {
  final Animation translationAnimation;

  final AnimationController rotationAnimationController;

  ATHVideoBottomInfo(
      {@required this.translationAnimation,
      @required this.rotationAnimationController});

  @override
  Widget build(BuildContext context) {
    return _buildBottomInfo(context);
  }

  Widget _buildBottomInfo(BuildContext context) {
    return Positioned(
      bottom: kSize120,
      left: 0,
      child: Container(
        constraints: BoxConstraints(minHeight: kSize260),
        width: MediaQuery.of(context).size.width,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Container(
              margin: EdgeInsets.symmetric(horizontal: kSize20),
              padding:
                  EdgeInsets.symmetric(vertical: kSize6, horizontal: kSize10),
              decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.all(Radius.circular(kSize8))),
              child: Text(
                "你的关注",
                style: TextStyle(
                    fontSize: kFontSize28, fontWeight: FontWeight.w600),
                textAlign: TextAlign.center,
              ),
            ),
            Container(
              margin:
                  EdgeInsets.symmetric(vertical: kSize20, horizontal: kSize20),
              child: Text(
                "@江景",
                style: TextStyle(
                    color: Colors.white,
                    fontSize: kFontSize36,
                    fontWeight: FontWeight.w600),
                textAlign: TextAlign.center,
              ),
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Container(
                      margin: EdgeInsets.symmetric(horizontal: kSize20),
                      child: Text(
                        "哈哈哈，好好吃啊！#今天你吃饭了吗",
                        textAlign: TextAlign.center,
                        style: TextStyle(
                          color: Colors.white,
                          fontSize: kFontSize32,
                        ),
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.symmetric(
                          horizontal: kSize20, vertical: kSize20),
                      child: Row(
                        children: [
                          Container(
                            padding: EdgeInsets.all(kSize10),
                            child: SvgPicture.asset(
                              "assets/icons/icon_music_note.svg",
                              height: kSize28,
                              color: Colors.white,
                            ),
                          ),
                          ClipRect(
                            child: SlideTransition(
                              position: translationAnimation,
                              child: SingleChildScrollView(
                                child: Text(
                                  "我确定我就是那一只披着羊皮的狼",
                                  textAlign: TextAlign.center,
                                  style: TextStyle(
                                    color: Colors.white,
                                    fontSize: kFontSize30,
                                  ),
                                ),
                              ),
                            ),
                          )
                        ],
                      ),
                    )
                  ],
                ),
                Container(
                  margin: EdgeInsets.only(right: kSize20),
                  child: RotationTransition(
                    turns: rotationAnimationController,
                    alignment: Alignment.center,
                    child: ATHUserAvatar(),
                  ),
                ),
              ],
            )
          ],
        ),
      ),
    );
  }
}
